using UnityEngine;
using UnityEngine.UI;
using QFramework;
using UnityEngine.SceneManagement;

namespace Survivor
{
	public class UIGameWinPanelData : UIPanelData
	{
	}
	public partial class UIGameWinPanel : UIPanel
	{
		protected override void OnInit(IUIData uiData = null)
		{
			mData = uiData as UIGameWinPanelData ?? new UIGameWinPanelData();
			Global.ResetData();
			// please add init code here
			BtnReturnStart.onClick.AddListener(() =>
			{
				CloseSelf();
				SceneManager.LoadScene("GameStar");
			});
		}
		
		protected override void OnOpen(IUIData uiData = null)
		{
			Time.timeScale = 0;
			AudioKit.PlaySound("GamePass");
			Global.ResetData();
		}
		
		protected override void OnShow()
		{
		}
		
		protected override void OnHide()
		{
		}
		
		protected override void OnClose()
		{
			Time.timeScale = 1;
		}
	}
}
